﻿using ClearSpringNet.Util;

namespace ClearSpringNet.Stream.Cardinality
{
    public class Builder : IBuilder<ICardinality>
    {
        protected int K;

        public Builder() : this(16)
        {
        }

        public Builder(int k)
        {
            K = k;
        }

        public int SizeOf()
        {
            return 1 << K;
        }

        ICardinality IBuilder<ICardinality>.build()
        {
            return new LogLog(K);
        }
    }
}